package Event;

/**
 * 事件注册测试
 * @author Administrator
 *
 */
public class EventImp {
	MyEventRegister register=new MyEventRegister();
	MyEventListenerInterface lis=null;
	//注册事件
	public void registerEvent(){
		lis=new MyEventListenerInterface(){
			public void myEventOccurred(MyEvent event){
				//deal .....
			}
		};
		register.addMyEventListener(lis);
	}
	//取消事件
	public void removeEvent(){
		if(lis!=null)
			register.removedMyEventListener(lis);
	}
}
